a={1,2,3}
print("aaaaaa\naaaaaaa\naaaaaaa\n");
locationId1 = stationIdToLocation(308,1056,16,3);
print("locationId1=" + locationId1);
print("bbbbbbbbbbb\nbbbbbbbbbbbb\nbbbbbbbbbbbb\n");
function stationIdToLocation(stationId1, stationId2, zoneId1, queueId1)
{
    zoneId = 1;
    queueId = 1;
    gridId = 1;
    if ( (1 == stationId1) || (2 == stationId1) )
    {
        print("<10");
        zoneId = 0;
        queueId = stationId1 - 1;
        gridId = 0;
    }
    elsif (stationId1 <= 100)
    {
        print("<100");
        return -1;
    }
    elsif ( stationId1 < 200 )
    {
        print("<200");
        zoneId = 1;
        temp = stationId1 - 100;
        queueId = temp- 1;
        gridId = 0;
    }
    elsif (stationId1 < 300)
    {
        print("<300");
        zoneId = 2;
        temp = stationId1 - 200;
        queueId = temp - 1;
        gridId = 0;
    }
    elsif (stationId1 < 400)
    {
        print("<400\n");
        zoneId = 3;
        temp = stationId1 - 300;
        queueId = temp - 1;
        gridId = 0;
    }
    else
    {
        return -1;
    }
    print("zoneId=" + zoneId + "," + queueId + ","+ gridId + "\n");
    return zoneId * 1000000 + queueId * 1000 + gridId;
}
